<?php
class CartsHelper extends AppHelper{
	var $helpers = array('Html', 'Form','Tree','Session','Number','Javascript');
	
	function beforeRender(){
		parent::beforeRender();
	
		App::import('Component', 'Carts');
		$this->Carts = new CartsComponent;
	
		$this->View =& ClassRegistry::getObject('view');
			
	}
		
	public function koszyk(){
		$items = $this->Session->read('Order');
		return $this->View->element('koszyk-maly',array('plugin'=>false,'items'=>$items));
	}
	
	public function maxDateForPrice(){
		return $this->Carts->maxDateForPrice();
	}
	
	public function kopie(){
		return array('0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','20','21','22','23','24','25','26','27','28','29','30');
	}
	
	
	public function format(){
		return array('9x13'=>'9x13','10x13'=>'10x13','10x15'=>'10x15','13x18'=>'13x18','15x21'=>'15x21','20x30'=>'20x30','25x38'=>'25x38','99x99'=>__('Do uzgodnienia',true));
	}
}